﻿@model BOL.tbl_Category

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Manage Category</h2>
@if (TempData["Msg"] != null)
{ <div class="alert alert-dismissable alert-info">
     <button type="button" class="close" data-dismiss="alert">×</button>
        @TempData["Msg"].ToString()
    </div>}
@using (Html.BeginForm("Create","Category",FormMethod.Post)) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.CategoryName, new { @class = "control-label col-md-2" })
            <div class="col-md-4">
                @Html.TextBoxFor(model => model.CategoryName, new { @class = "form-control " })
                @Html.ValidationMessageFor(model => model.CategoryName, null, new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CategoryDesc, new { @class = "control-label col-md-2" })
            <div class="col-md-4">
                @Html.TextBoxFor(model => model.CategoryDesc, new { @class = "form-control " })
                @Html.ValidationMessageFor(model => model.CategoryDesc, null, new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-4">
                <input type="submit" value="Create" class="btn btn-primary" />
            </div>
        </div>
    </div>
}